<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      class Person {
        // name = 'jack';
        // age = 20;
        constructor(name, age) {
          this.name = name;
          this.age = age;
        }
      }
      // 实例（对象）化
      const p1 = new Person('lili', 30);
      console.log(p1);
    </script>
  </body>
</html>
